import {systemServer} from '../baseApi'

export class roleApi {
  static save(data) {
    return systemServer.connection('POST', '/sys/role/save', data)
  }

  static findPage (data) {
    return systemServer.connection('POST', '/sys/role/findPage', data)
  }

  static delete(data) {
    return systemServer.connection('POST', '/sys/role/delete', data)
  }

  static findByName(data) {
    return systemServer.connection('GET', '/sys/role/findByName', data)
  }

  static update(data) {
    return systemServer.connection('POST', '/sys/role/update', data)
  }

  static findMenuIdByRole(data) {
    return systemServer.connection('GET', '/sys/role/findMenuIdByRole/' + data, data)
  }

  static updateRoleMenu(data) {
    return systemServer.connection('POST', '/sys/role/updateRoleMenu', data)
  }
}
